package com.highveldsky.gwtdatabinding.server.service;

import java.util.List;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.highveldsky.gwtdatabinding.client.service.CarService;
import com.highveldsky.gwtdatabinding.server.data.DAO;
import com.highveldsky.gwtdatabinding.shared.model.Car;

@SuppressWarnings("serial")
public class CarServiceImpl extends RemoteServiceServlet implements CarService{

	DAO dao = DAO.getInstance();
	
	public Long createCar(Car car) throws Exception {
		return dao.createCar(car);
	}
	public void updateCar(Car car) throws Exception {
		dao.updateCar(car);
	}
	public void deleteCar(Long id) throws Exception {
		dao.deleteCar(id);
	}
	public Car readCar(Long id) throws Exception {
		return dao.readCar(id);
	}
	public List<Car> listCars() throws Exception {
		return dao.listCars();
	}

}
